/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.msg.hrappy.api.assemblers;

import edu.msg.hrappy.backend.model.Job;
import edu.msg.hrappy.common.dto.JobDTO;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;

/**
 *
 * @author toroke
 */
@LocalBean
@Stateless
public class JobAssembler {
    
    public Job dtotoModel(JobDTO jobdto){
        Job job = new Job();
        job.setName(jobdto.getName());
        job.setRequirements(jobdto.getRequirements());
        job.setResponsibilities(jobdto.getResponsibilities());
        return job;
    }
    
    public JobDTO modeltoDTO(Job job){
        JobDTO jobdto = new JobDTO();
        jobdto.setName(job.getName());
        jobdto.setRequirements(job.getRequirements());
        jobdto.setResponsibilities(job.getResponsibilities());
        return jobdto;
    }
}
